﻿using System;
using System.Collections.Generic;

class DifferentLetters
{
    static void Main()
    {
        Console.WriteLine("Enter a sentence:");
        string sentence = Console.ReadLine();
        Dictionary<char, int> dictionary = new Dictionary<char, int>();
        foreach (char ch in sentence)
        {
            if (dictionary.ContainsKey(ch))
            {
                dictionary[ch]++;
            }
            else
            {
                dictionary.Add(ch, 1);
            }
        }
        foreach (var letter in dictionary)
        {
            Console.WriteLine("{0} {1}",letter.Key, letter.Value);
        }
    }
}

